package com.huo.thread;

import java.util.concurrent.locks.AbstractQueuedSynchronizer;

public class Test extends AbstractQueuedSynchronizer{
    public static void main(String[] args) {
        Test t = new Test();
        t.test();
        System.out.println();

    }

    public boolean test(){
        System.out.println(getState());
        boolean flag = compareAndSetState(0,4);
        System.out.println(getState());
        return flag;
    }
}
